package com.joysuch.wwyt.workflow.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.joysuch.wwyt.alert.entity.NoticeWaitingTriggerList;
import com.joysuch.wwyt.mh.bean.ProcessNoticeSearchBean;
import com.joysuch.wwyt.workflow.entity.ProcessNoticeList;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jwk
 * @since 2021-07-20
 */
public interface ProcessNoticeListService extends IService<ProcessNoticeList> {

    /**
     * 查找流程配置的所有通知提醒
     * @param processId
     * @return
     */
    List<ProcessNoticeList> findAllProcessNoticeList(Long processId);

    /**
     * 分页获取通知提醒
     * @param searchBean
     * @return
     */
    IPage<ProcessNoticeList> findListPaging(ProcessNoticeSearchBean searchBean);

    /**
     * 生成流程通知
     * @param processId
     * @param taskCode
     * @param processName
     * @param formData
     * @return
     */
    boolean generateNotice(Long processId,String taskCode,String processName, String formData,String objectId);

    /**
     * 查找当前任务待发送的通知列表
     * @param taskCode
     * @return
     */
    List<NoticeWaitingTriggerList> findTriggerList(String taskCode);
}
